package com.dycx.api.controller.app.food;

import com.dycx.common.RestResponse;
import com.dycx.food.service.SpecFoodService;
import com.dycx.food.vo.SpecSimpleVO;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/app/food/spec")
@AllArgsConstructor
public class SpecFoodApiController {

    private SpecFoodService specService;


    /**
     * 获取检索规格和参数
     **/
    @GetMapping("/getFilterSpecByClassId")
    public RestResponse<List<SpecSimpleVO>> getFilterSpecByClassId(Integer goodsClassId) {
        return RestResponse.success(specService.getFilterSpecByClassId(goodsClassId));
    }

}
